<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>IE6双倍间距的问题</title>
        <style>
            .fl { float: left; }
            /* 在float：left,float:right中添加*display:inline;属性解决IE6中双倍间距的问 */
            .fr { float: right;}
            .clearfix:after { display: block; clear: both; content: ""; visibility: hidden; height: 0; }
            .clearfix1:after { content:'';display: table-cell; clear: both;}
            .clearfix { zoom: 1; }
            .box-200-200{
                width: 200px;
                height: 200px;
            }
            .box-600-200{
                width: 600px;
                height: 200px;
            }
            .bgc-pink{
                background-color: pink;
            }
            .bgc-purple{
                background-color: purple;
            }
            .di{
                display: inline;
            }
            p{
                margin:10px 0;
            }
            .strong{
                margin:15px 0;
            }
            .m10{
                margin: 10px;
            }
        </style>
    </head>
    <body>
        <p>加了清除浮动</p>
        <div style="overflow:hidden">
            <p class="strong">梦想是要有的，万一实现了呢？</p>
        </div>
        <div class="clearfix">
            <div class="fl box-200-200 bgc-pink m10">横沙岛</div>
            <div class="fl box-600-200 bgc-purple">枸杞岛</div>
        </div>
        <p>解决IE6下首个浮动元素有margin水平方向的属性时创享双倍行距的问题，加display:*inline;属性</p>
        <div class="clearfix">
            <div class="fl di box-200-200 bgc-pink m10">横沙岛</div>
            <div class="fl box-600-200 bgc-purple">枸杞岛</div>
        </div>
        <p>不加清除浮动</p>
        <div>
            <div class="fl box-200-200 bgc-pink">横沙岛</div>
            <div class="fr box-600-200 bgc-purple">枸杞岛</div>
        </div>
        <p>梦想是要有的，万一实现了呢？</p>
    </body>
</html>